package com.kinyx.framework.exception;

import java.util.Locale;
import java.util.Map;

import lombok.Getter;

/**
 * 错误编码
 */
class ErrorCode implements IErrorCode {

	@Getter
	private final String msg;

	ErrorCode(final Throwable cause) {
		this.msg = cause.getMessage();
	}

	@Override
	public int getErrorCode() { return -1000; }

	@Override
	public String getErrorMessage(final Locale locale, final Map<String, Object> params) {
		return this.msg;
	}

}
